from stark.service.v1 import site
from web import models


from web.views.school import SchoolHandler  # 学校表，增删改查
from web.views.department import DepartHandler  # 部门表增删改查
from web.views.userinfo import UserInfoHandler
from web.views.course import CourseHandler
from web.views.class_list import ClassListHandler
from web.views.public_customer import PublicCustomerHandler
from web.views.private_customer import PrivateCustomerHandler
from web.views.consult_reccord import ConsultRecordHandler
from web.views.payment_record import PaymentRecordHandler
from web.views.check_payment_record import CheckPaymentRecordHandler
from web.views.student import StudentHandler
from web.views.score import ScoreHandler
from web.views.course_record import CourseRecordHandler

# 自动获取url
site.register(models.School, SchoolHandler)
site.register(models.Department, DepartHandler)
site.register(models.UserInfo, UserInfoHandler)
site.register(models.Course, CourseHandler)
site.register(models.ClassList,ClassListHandler)
site.register(models.Customer,PublicCustomerHandler,prev='pub')
site.register(models.Customer,PrivateCustomerHandler,prev='private')
site.register(models.ConsultRecord,ConsultRecordHandler)
site.register(models.PaymentRecord,PaymentRecordHandler)
site.register(models.PaymentRecord,CheckPaymentRecordHandler,prev='check')
site.register(models.Student,StudentHandler)
site.register(models.ScoreRecord,ScoreHandler)
site.register(models.CourseRecord,CourseRecordHandler)

